{% extends 'template.html' %}

{% block head %}
	<script>
		$(document).ready(function () {
			$("#result").hide();
		});
		gameinfo = {
			"game": "{{ game.id }}",
			"user_robot": "{{ user_robot.id }}",
			"oppo_robot": "{{ oppo_robot.id }}"
		};
		$.post(
			"{% url 'game:compete' %}", gameinfo, function (data) {
				data = eval(data);
				$("#waiting").hide();
				$("#result").show();
				start(data);
			});
	</script>
{% endblock %}

{% block body %}
	<div class="container">
		<p id="waiting">游戏进行中，请耐心等待</p>

		<div id="result">
			{% include gameplayer_url %}
		</div>
	</div>
{% endblock %}